home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 161 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: An STL helper -- and template and type shenanigans
  5. Date: 29 Jan 1996 10:50:26 PST
  6. Organization: Computer Science, University of Melbourne, Australia
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <9601281244.8175@mulga.cs.mu.OZ.AU>
  9. References: <30FCDA77.69CB@trilogy.com> <4e2dqo$gh@peippo.cs.tut.fi>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: Sun, 28 Jan 1996 23:44:08 +1100
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBVAwUBMQ0XG0y4NqrwXLNJAQGn2wH/QJBpCT1G+3L2CD0lnKVPsfJcSPOkdKPD
  14.     SHwdIpYDTsApcjQoc2tnnQ8odJTlYLxN0FqZwdg1EbpVL31/65OXiw==
  15.     =Nebr
  16. Originator: austern@isolde.mti.sgi.com
  17.  
  18. esap@cs.tut.fi (Pulkkinen Esa) writes:
  19.  
  20. >template <class T>
  21. >class type_dereferencer<T*>
  22. >{
  23. >public:
  24. >  typedef T base_type;
  25. >};
  26. [...]
  27. >And if typedef templates were allowed, you could use a slightly better
  28. >syntax:
  29. >
  30. >template <class T>
  31. >typedef type_dereferencer<T>::base_type type_dereference;
  32.  
  33. Can someone please remind me why we decided not to allow typedef templates?
  34. It certainly seems like a bad idea to force everyone to use this silly
  35. obfuscation for what is obviously a common need.
  36.  
  37. --
  38. Fergus Henderson                 WWW: http://www.cs.mu.oz.au/~fjh
  39. fjh@cs.mu.oz.au                  PGP: finger fjh@128.250.37.3
  40. ---
  41. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  42.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  43.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  44.